
set(SRC_ROOT ${ShaderParticles_SOURCE_DIR}/src)

set(HDRS
	${SRC_ROOT}/types.h
	${SRC_ROOT}/IBufferObject.h
	${SRC_ROOT}/VertexBufferObject.h
	${SRC_ROOT}/UniformBufferObject.h
	${SRC_ROOT}/TransformFeedbackObject.h
	${SRC_ROOT}/ShaderSystem.h
	${SRC_ROOT}/Shader.h
	${SRC_ROOT}/Attribute.h
	${SRC_ROOT}/Uniform.h
	${SRC_ROOT}/Camera.h
)
set(SRCS
    ${SRC_ROOT}/main.cpp
	${SRC_ROOT}/IBufferObject.cpp
	${SRC_ROOT}/VertexBufferObject.cpp
	${SRC_ROOT}/UniformBufferObject.cpp
	${SRC_ROOT}/TransformFeedbackObject.cpp
	${SRC_ROOT}/ShaderSystem.cpp
	${SRC_ROOT}/Shader.cpp
	${SRC_ROOT}/Camera.cpp
)

find_package(OpenGL REQUIRED)
find_package(Glew REQUIRED)
find_package(GLM REQUIRED)
set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML REQUIRED)
set(WINDOW_EXT_LIBS ${OPENGL_gl_LIBRARY})
set(WINDOW_EXT_LIBS ${WINDOW_EXT_LIBS} winmm gdi32)

add_executable(ShaderParticles ${HDRS} ${SRCS})
set_target_properties(ShaderParticles PROPERTIES DEBUG_POSTFIX _d)
SET_TARGET_PROPERTIES(ShaderParticles PROPERTIES LINKER_LANGUAGE CXX)

target_link_libraries(ShaderParticles
  debug ${SFML_WIN_LIBRARY_DEBUG} optimized ${SFML_WIN_LIBRARY_RELEASE}
  debug ${SFML_SYS_LIBRARY_DEBUG} optimized ${SFML_SYS_LIBRARY_RELEASE}
  ${OPENGL_LIBRARIES}
  debug ${GLEW_LIBRARY_DEBUG} optimized ${GLEW_LIBRARY_RELEASE}
)

include_directories(${OPENGL_INCLUDE_PATH})
include_directories(${SFML_INCLUDE_DIR})
include_directories(${GLEW_INCLUDE_PATH})
include_directories(${GLM_DIR})
